﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="hangqing_edit.aspx.cs" Inherits="DTcms.Web.admin.hangqing.hangqing_edit" ValidateRequest="false" %>

<%@ Import Namespace="DTcms.Common" %>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>编辑石材价格</title>
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0,user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <link rel="stylesheet" type="text/css" href="../../scripts/artdialog/ui-dialog.css" />
    <link rel="stylesheet" type="text/css" href="../skin/icon/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="../skin/default/style.css" />
    <script type="text/javascript" charset="utf-8" src="../../scripts/jquery/jquery-1.11.2.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="../../scripts/jquery/Validform_v5.3.2_min.js"></script>
    <script type="text/javascript" charset="utf-8" src="../../scripts/artdialog/dialog-plus-min.js"></script>
        <script type="text/javascript" charset="utf-8" src="../../scripts/webuploader/webuploader.min.js"></script>
     <script type="text/javascript" charset="utf-8" src="../js/uploader.js"></script>
    <script type="text/javascript" charset="utf-8" src="../js/common.js"></script>
    <script type="text/javascript" charset="utf-8" src="../js/laymain.js"></script>
    <script type="text/javascript">
        $(function () {
            //初始化表单验证
            $("#form1").initValidform();
            //初始化上传控件
            $(".upload-img").InitUploader({ sendurl: "../../tools/upload_ajax.ashx", swf: "../../scripts/webuploader/uploader.swf" });
        });
        function setPrice(title) {
            var _html = '<tr>';
            _html += '<td align="center">';
            _html += '<input type="hidden" name="hide_price_id" value="0" />';
            _html += '<input type="hidden" name="hide_title" value="' + title + '" />';
            _html += '<p>' + title + '</p>';
            _html += '</td>';
            _html += '<td align="center"><input type="text" name="txt_price" class="td-input" value="" /></td>';
            _html += '<td style="white-space:inherit;word-break:break-all;">';
            _html += '<input type="hidden" name="hide_is_up" value="1" />';
            _html += '</td>';
            _html += '<td align="center"><input type="text" name="txt_sortid" maxlength="10" class="td-input" value="99" onKeyDown="return checkForFloat(this,event);" /></td>';
            _html += '<td align="center"><a href="javascript:void(0)" class="icon-btn" onclick="delPrice(this)"><span>删除</span></a></td>';
            _html += '</tr>';
            $(".border-table").append(_html);
        }
        function delPrice(obj) {
            $(obj).parent().parent().remove();
        }
    </script>
</head>

<body class="mainbody">
    <form id="form1" runat="server">
        <!--导航栏-->
        <div class="location">
            <a href="photo_list.aspx" class="back"><i class="iconfont icon-up"></i><span>返回列表页</span></a>
            <a href="../center.aspx"><i class="iconfont icon-home"></i><span>首页</span></a>
            <i class="arrow iconfont icon-arrow-right"></i>
            <a href="photo_list.aspx"><span>价格行情管理</span></a>
            <i class="arrow iconfont icon-arrow-right"></i>
            <span>编辑石材价格</span>
        </div>
        <div class="line10"></div>
        <!--/导航栏-->

        <!--内容-->
        <div id="floatHead" class="content-tab-wrap">
            <div class="content-tab">
                <div class="content-tab-ul-wrap">
                    <ul>
                        <li><a class="selected" href="javascript:;">基本信息</a></li>
                    </ul>
                </div>
            </div>
        </div>

        <div class="tab-content">
            <dl>
                <dt>显示状态</dt>
                <dd>
                    <div class="rule-multi-radio">
                        <asp:RadioButtonList ID="rblStatus" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
                            <asp:ListItem Value="0" Selected="True">显示</asp:ListItem>
                            <asp:ListItem Value="1">关闭</asp:ListItem>
                        </asp:RadioButtonList>
                    </div>
                </dd>
            </dl>
               <dl>
                <dt>所在地区</dt>
                <dd>
                     <div class="rule-single-select">
                        <asp:DropDownList id="ddlProvince" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlProvince_SelectedIndexChanged"></asp:DropDownList>
                     </div>
                    <div class="rule-single-select">
                        <asp:DropDownList id="ddlCity" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlCity_SelectedIndexChanged">
                            <asp:ListItem Value="0">选择城市</asp:ListItem>
                        </asp:DropDownList>
                     </div>
                     <div class="rule-single-select">
                        <asp:DropDownList id="ddlDistrict" runat="server">
                            <asp:ListItem Value="0">选择地区</asp:ListItem>
                        </asp:DropDownList>
                     </div>
                </dd>
</dl>
            <dl>
                <dt>石材名称</dt>
                <dd>
                    <asp:TextBox ID="txtTitle" runat="server" CssClass="input normal" datatype="*1-100" sucmsg=" "></asp:TextBox>
                    <span class="Validform_checktip">*</span>
                </dd>
            </dl>
 <dl>
                <dt>显示图片</dt>
                <dd>
                    <asp:TextBox ID="txtImgUrl" runat="server" CssClass="input normal upload-path" />
                    <div class="upload-box upload-img"></div>
                </dd>
            </dl>
             <dl>
                <dt>材质</dt>
                <dd>
                     <div class="rule-single-select">
                        <asp:DropDownList id="ddlCaizhiID" runat="server"></asp:DropDownList>
                     </div>
                </dd>
            </dl>
             <dl>
    <dt>石材价格</dt>
    <dd>
<asp:Repeater ID="rptSizeList" runat="server">
<ItemTemplate>
      <a class="icon-btn add" onclick="setPrice('<%#Eval("title")%>')"><span><%#Eval("title")%></span></a>
</ItemTemplate>
</asp:Repeater>
      <div class="table-container" style="padding-top:10px;">
        <asp:HiddenField ID="hide_price_list" runat="server" />
        <table border="0" cellspacing="0" cellpadding="0" class="border-table" width="82%">
          <thead>
          <tr>
            <th align="center">厚度尺寸</th>
            <th width="20%">价格(元)</th>
            <th width="10%">价格趋势（0下降 1上升）</th>
            <th width="10%">排序</th>
            <th width="10%">操作</th>
          </tr>
          </thead>
          <tbody id="item_box">
          <asp:Repeater ID="rptHongqingPrice" runat="server">
          <ItemTemplate>
          <tr>
             <td align="center">
                <input type="hidden" name="hide_price_id" value="<%#Eval("id")%>" />
                <input type="hidden" name="hide_title" value="<%#Eval("title")%>" />
                <p><%#Eval("title")%></p>
             </td>
             <td align="center"><input type="text" name="txt_price" class="td-input" value="<%#Eval("price")%>" /></td>
             <td align="center">
             <input type="text" name="hide_is_up" value="<%#Eval("is_up")%>" />
             </td>
             <td align="center"><input type="text" name="txt_sortid" maxlength="10" class="td-input" value="<%#Eval("sort_id")%>" onKeyDown="return checkForFloat(this,event);" /></td>
             <td align="center"><a href="javascript:void(0)" class="icon-btn" onclick="delPrice(this)"><span>删除</span></a></td>
          </tr>
          </ItemTemplate>
          </asp:Repeater>
          </tbody>
        </table>
      </div>
    </dd>
  </dl>
            <dl>
                <dt>浏览次数</dt>
                <dd>
                    <asp:TextBox ID="txtClick" runat="server" CssClass="input small" datatype="n" sucmsg=" ">0</asp:TextBox>
                    <span class="Validform_checktip">点击浏览该信息自动+1</span>
                </dd>
            </dl>
            <dl>
                <dt>排序数字</dt>
                <dd>
                    <asp:TextBox ID="txtSortId" runat="server" CssClass="input small" datatype="n" sucmsg=" ">99</asp:TextBox>
                    <span class="Validform_checktip">*数字，越小越向前</span>
                </dd>
            </dl>
        </div>
        <!--/内容-->

        <!--工具栏-->
        <div class="page-footer">
            <div class="btn-wrap">
                <asp:Button ID="btnSubmit" runat="server" Text="提交保存" CssClass="btn" OnClick="btnSubmit_Click" />
                <input name="btnReturn" type="button" value="返回上一页" class="btn yellow" onclick="javascript: history.back(-1);" />
            </div>
        </div>
        <!--/工具栏-->
    </form>
</body>
</html>
